﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;
using WiMo.Games;
using WiMo.Games.StandardCollisions;
using WiMo.Games.StandardInput;
using WiMo.Games.StandardAudio;
using WiMo.Games.StandardMenus;
using WiMo.Games.StandardPhysics;

namespace BalloonCaptain
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            var gameEngine = new WiMo.Games.WM5.GameEngine();

            gameEngine.PhysicsManager = new PhysicsManager();
            var formSize = new Size(gameEngine.Form.Size.Width, gameEngine.Form.Size.Height);
            var targetSize = new Size(240, 320);
            gameEngine.CollisionManager = new CollisionManager(targetSize);
            gameEngine.Display = new WiMo.Games.Premium.GDIDisplay.DisplayManager(gameEngine.Form.Handle, targetSize, formSize, Display.AspetRatioThreeByFour);
            gameEngine.InputManager = new InputManager(gameEngine.Form, gameEngine);
            gameEngine.AudioManager = new AudioManager(gameEngine);
            gameEngine.MenuManager = new MenuManager(gameEngine);

            var game = new Game(gameEngine);
            gameEngine.Initialize(game);
            gameEngine.Start();
            Application.Run(gameEngine.Form);
        }
    }
}